<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'Home\IndexController@index');

//后台登录页面路由
Route::get('/admin/public/login','Admin\PublicController@login') -> name('login'); //登录页面路由
Route::post('/admin/public/checkLogin','Admin\PublicController@checkLogin'); 
//登录退出路由
Route::get('/admin/public/logout','Admin\PublicController@logout'); //退出登录路由

//后台路由
Route::group(['prefix' => 'admin','middleware' => ['auth:admin','checkrbac']],
function(){

	Route::get('index/index','Admin\IndexController@index');//展示后台首页页面
	Route::get('index/welcome','Admin\IndexController@welcome');//展示后台首页页面 
	Route::get('admin/index','Admin\AdminController@index'); //用户展示页面
	Route::any('admin/add','Admin\AdminController@add'); //用户添加页面
	Route::get('admin/del','Admin\AdminController@del'); //用户删除页面
	Route::any('admin/edit','Admin\AdminController@edit'); //用户修改页面
	Route::get('admin/serverSide/{mark?}','Admin\AdminController@serverSide');//展示serverSide展示服务端分页
	Route::any('auth/add','Admin\AuthController@add'); //添加权限
	Route::any('auth/edit','Admin\AuthController@edit'); //编辑权限
	//会员管理路由
	Route::get('member/index','Admin\MemberController@index');//列表页面
	Route::any('member/add','Admin\MemberController@add');//添加操作
	Route::get('member/del','Admin\MemberController@del');//删除操作
	Route::any('member/edit','Admin\MemberController@edit');//修改操作
	Route::get('member/getAreasByPid','Admin\MemberController@getAreasByPid');//ajax专用


	//餐饮管理
	Route::get('eat/index','Admin\EatController@index'); //
	Route::any('eat/add','Admin\EatController@add'); 



	// Route::get('auth/delete','Admin\AuthController@delete'); //删除权限
	Route::get('auth/index','Admin\AuthController@index'); //权限列表
	// 角色管理
	Route::get('role/index','Admin\RoleController@index'); //角色列表
	Route::any('role/assign','Admin\RoleController@assign'); //角色分配
	Route::any('role/add','Admin\RoleController@add'); //角色添加


	Route::any('article/index','Admin\ArticleController@index'); //角色添加


	// 文章管理
	Route::get('article/index', 'Admin\ArticleController@index'); // 列表显示
	Route::any('article/add', 'Admin\ArticleController@add'); 		// 添加文章
	Route::any('article/changeStatus/{id}', 'Admin\ArticleController@changeStatus'); 		// 修改文章状态
	Route::any('article/edit/{id}', 'Admin\ArticleController@edit'); 		// 编辑文章
	Route::any('article/delete/{id}', 'Admin\ArticleController@delete'); 		// 删除文章
	//会员管理路由
	Route::get('member/index','Admin\MemberController@index');//列表页面
	Route::any('member/add','Admin\MemberController@add');//添加操作
	Route::get('member/del/{id}','Admin\MemberController@del');//删除操作
	Route::any('member/edit/{id}','Admin\MemberController@edit');//修改操作
	Route::get('member/getAreasByPid','Admin\MemberController@getAreasByPid');//ajax专用
	Route::post('uploader/webuploader','Admin\UploaderController@webuploader');//文件上传
	Route::get('activity/index','Admin\ActivityController@index');//活动展示页面
	Route::any('activity/add','Admin\ActivityController@add');//活动添加页面
	Route::get('activity/del/{id}','Admin\ActivityController@del');//活动删除方法
	Route::any('activity/edit/{id}','Admin\ActivityController@edit');//活动删除方法

	// 路线路由
	Route::get('line/index', 'Admin\LineController@index') -> name('line.index');
	Route::get('line/add', 'Admin\LineController@add') -> name('line.add');
	Route::post('line/store', 'Admin\LineController@store') -> name('line.store');
	//景点路由
	Route::get('scenic/index','Admin\ScenicController@index');
	Route::get('scenic/show','Admin\ScenicController@show');
	Route::any('scenic/add','Admin\ScenicController@add');
	Route::any('scenic/edit/{id}','Admin\ScenicController@edit');
	Route::get('scenic/del{id}','Admin\ScenicController@del');
	//景点图片上传
	Route::post('uploader/webuploader','Admin\UploaderController@webuploader');
}); 